package com.smart.workflow.markers;

import java.util.Collection;

/**
 * Repository that allows to find statemachines that are awaiting for an event
 * @author Lukasz
 */
public interface EventRepository {
	/**
	 * find all statemachines that are registered for an event
	 * @param event event we are waiting for
	 * @return list of awaiting statemachines
	 */
	public Collection<Object> processesForEvents(Object event);
	
	/**
	 * notify the repository that processes of one class are interested in events of the other class
	 * @param eventClass
	 * @param processClass
	 */
	public void registerInterestedProcesses(Class eventClass, Class processClass);
}
